//
//  FavoritesTableViewCell.m
//  Mecca
//
//  Created by Ryan Enguero on 6/30/14.
//  Copyright (c) 2014 TapDash Heuristics. All rights reserved.
//

#import "FavoritesTableViewCell.h"

#import "FTWAPI.h"


@implementation FavoritesTableViewCell{
    
    FTWAPI *ftwApi;
    
}

- (void)awakeFromNib
{
    // Initialization code
    self.actLoading.hidden = YES;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setImageString:(NSString *)strImage{
    [NSThread detachNewThreadSelector:@selector(showImage:) toTarget:self withObject:strImage];
    
    
    
}

-(void)showImage:(NSString*)imageShow{
    @autoreleasepool {
        NSData *imageList = [NSData dataWithContentsOfURL:[NSURL URLWithString:imageShow]];
        
        
        
        
        [self.albumImg setAlpha:0];
        
        [UIView animateWithDuration:0.5 animations:^{
            
            self.albumImg.image = [UIImage imageWithData:imageList];
            [self.actLoading setHidden:YES];
            [self.albumImg setAlpha:1];
        } completion:^(BOOL finished) {
            
        }];
        
        
        //[self animationActivity];
    }
}

@end
